﻿using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.PB;
using Coldairarrow.Entity.View;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.PB
{
    public partial interface IPB_WarehousingNoticeBusiness
    {
        Task<PageResult<PB_WarehousingNotice>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<PageResult<PB_WarehousingNoticeDTO>> GetDataListAsyncDTO(PageInput<ConditionDTO> input);
        //Task<List<PB_PickUpMaininfo>> GetDataListInfo(string ParentId);
        Task<PB_WarehousingNotice> GetTheDataAsync(string id);
        Task<PageResult<PB_WarehousingNoticeDTO>> GetdeliverGoods(PageInput<ConditionDTO> input);
        Task<PageResult<PB_WarehousingNoticeDTO>> GetStockUp(PageInput<List<ConditionDTO>> input);
        //Task<PageResult<DeliveryNoticeDTO>> GetDeliveryNoticeInfo(string pid);

        Task AddDataAsync(PB_WarehousingNotice data);
        Task UpdateDataAsync(PB_WarehousingNotice data);
        Task UpdateReserveState(string id);
        Task DeleteDataAsync(List<string> ids);

        /// <summary>
        /// 入库通知单审核
        /// </summary>
        /// <returns></returns>
        Task<AjaxResult> SaveToExamine(string idIn, bool judge);
        Task<AjaxResult> SaveToExamineedit(string idIn,bool judge);
        Task<AjaxResult> SavePBPickUpList(string idIn, bool judge);
        Task<GetStockDetailsDTO> GetStockDetails(string id);
        Task<GetStockDetailsDTO> GetPBPickUpList(string id);

        /// <summary>
        /// PC入库通知列表
        /// </summary>
        /// <param name="input"></param>
        /// 2022-03-03   赵锦涛
        /// <returns></returns>
        Task<PageResult<View_WarehousingNotice>> GetWarehousingNoticeListAsync(PageInput<ConditionDTO> input);

        /// <summary>
        /// PC查看入库通知单明细
        /// </summary>
        /// <param name="NoticeId">入库通知单Id</param>
        /// 2022-03-03   赵锦涛
        /// <returns></returns>
        Task<List<PB_WarehousingNoticeDetailed>> GetWarehousingNoticeDetailedAsync(string NoticeId);

    }

    /// <summary>
    /// PC入库通知单审核时使用
    /// </summary>
    public class PackInfoJobBookingDTO
    {
        /// <summary>
        /// 成品Id
        /// </summary>
        public string JobBookingId { get; set; }

        /// <summary>
        /// 入库通知Id
        /// </summary>
        public string NoticeId { get; set; }

        public string PakcId { get; set; }

        /// <summary>
        /// 报工单Id
        /// </summary>
        public string JobId { get; set; }

        /// <summary>
        /// 数量
        /// </summary>

        public double? Nums { get; set; }

        public string JobMaterialId { get; set; }

    }

    /// <summary>
    /// 查看通知入库单明细
    /// </summary>
    public class PB_WarehousingNoticeDetailed
    {
        /// <summary>
        /// 入库单明细Id
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// 入库单明细包Id
        /// </summary>
        public string PackId { get; set; }

        /// <summary>
        /// 物料id
        /// </summary>
        public string MaterialId { get; set; }

        /// <summary>
        /// 入库单明细包名称
        /// </summary>
        public string BoxName { get; set; }


        /// <summary>
        /// 入库单明细包内物料数量
        /// </summary>
        public double? Nums { get; set; }

        /// <summary>
        /// 入库通知单Id
        /// </summary>
        public string RefCode { get; set; }


        /// <summary>
        /// 序号
        /// </summary>
        public int SerialNumber { get; set; }


        /// <summary>
        /// 物料规格
        /// </summary>
        public string Mspec { get; set; }

        /// <summary>
        /// 物料编码
        /// </summary>
        public string Mcode { get; set; } 

    }

}